home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Telnet 2.7b5 / source / Screens / wind.h < prev   
Encoding:
Text File  |  1995-03-20  |  4.8 KB  |  139 lines  |  [TEXT/CWIE]

  1. //
  2. //        MacLook Window Management Data Structure Definition
  3. //
  4.  
  5. #define    MAXKB    256            // BYU mod 
  6.  
  7. #define PASTE_IN_PROGRESS    0x4000 // BYU LSC 
  8. #define PASTE_DONE            0x0040 //CCP 2.7
  9. //    The following are for the "active" field.
  10. #define    CNXN_NOTINUSE    -2
  11. #define    CNXN_DNRWAIT    -1
  12. #define    CNXN_ACTIVE         0
  13. #define    CNXN_OPENING     1
  14. #define    CNXN_ISCORPSE     2
  15. #define MHOPTS_BASE        37    // Base option for {my,his}opts (Authenticate)
  16.                             //  {my,his} opts should only be used for telnet options
  17.                             //  in the range starting at MHOPTS_BASE and limited
  18.                             //  by MHOPTS_SIZE. This saves memory.
  19. #define MHOPTS_SIZE        2    // Number of options supported in {my,his}opts
  20.  
  21. #define SLC_ARRAY_SIZE    30    // This should match the value of SLC_MAX from parse.h
  22.  
  23. struct WindRec {
  24. short    
  25.     vs,                // virtual screen number
  26.     port,            // TCP/IP port number 
  27.     active,            // See above for definition of possible values 
  28.     enabled,        // Are we currently enabled for receive? 
  29.  
  30.     vtemulation,    // 0 = VT100, 1 = VT 220 
  31.     bsdel,            // backspace or delete is default 
  32.     eightbit,        // eight bit font displayed (false is seven bit display
  33.     national,        // LU/MP: translation table to use for this connection 
  34.     arrowmap,        // MAT: should we allow the arrow keys to be mapped?? 
  35.     showErrors,        // show ALL errors if this is set 
  36.     pgupdwn,        // JMB/MAT: should we have page up/down do local window movement? 
  37.     keypadmap,        // CCP 2.7: should we have numeric keypad operators work like regular operators? 
  38.     emacsmeta,        // JMB/SMB:    should option key work as EMACS meta key? 
  39.     Xterm,            // JMB/WNR:    should Xterm sequences be recognized? 
  40.     halfdup,        // If true then half-duplex mode 
  41.     forcesave,        // NCSA 2.5: force lines to be saved 
  42.     crmap,            // BYU mod - CR's second byte is ...
  43.  
  44.     tekclear,        // Does tektronix (1) clear screen or (0) add window 
  45.     tektype,        // -1 = TEK not allowed, 0 = 4014, 1 = 4105 
  46.     curgraph,        // Associated Tek drawing 
  47.  
  48.     maxscroll,        // Requested amount of scroll back 
  49.     wrap,            // whether vtwrap is set or not for this screen 
  50.     echo,            // NOTE: this is backwards - I am echoing your chars 
  51.     ESscroll,        // will Clear Screen Save Lines? 
  52.  
  53.     ANSIgraphics,    // ANSI color sequences (CCP 2.7)    
  54.     termstate,        // Emulation State (-1 is none, 0 is VT100) 
  55.                     // = TEKTYPE, send data to VGwrite 
  56.                     // = RASTYPE, send data to VRwrite 
  57.     positionIndex,    // CCP 2.7:  for determining window placement
  58.     naws,            // NCSA: will negotiate NAWS 
  59.     lineAllow,        // allow linemode? 
  60.     Isga,            // I am supressing go ahead 
  61.     Usga,            // You are supressing go ahead 
  62.     Ittype,            // I am sending terminal type negotiations.. 
  63.     telstate,        // Telnet State 
  64.     timing,            // True if waiting for timing mark 
  65.     remote_flow,    // true if they are dictating flow_control 
  66.     allow_flow,      // true unless prior is true AND the host has told us to turn flow control off 
  67.     restart_any_flow,// true if any character (except XOFF) will restart flow 
  68.     substat,        // Telnet Subnegot. State 
  69.     parseIndex,        // save an index into the subnegotiation parsed data 
  70.  
  71.     portNum,        // port number from the application save set 
  72.     kblen,            // Pointer to next char in buffer to be used 
  73.     clientflags;    // BYU mod - boolean flags for ftp client 
  74.  
  75. Str63
  76.     machine;        // Name of machine we are connecting to
  77.  
  78. Str32
  79.     answerback;        // Message to send when server sends TERMTYPE Telnet option 
  80.  
  81. //     The following are used during paste operations 
  82. short
  83.     outlen,            // Length of text remaining to be pasted 
  84.     pastemethod,    // 0 = All at once, 1 = in blocks of size pasteblock 
  85.     pastesize;        // Size of paste "blocks" 
  86.     
  87. char
  88.     *outptr,        // Pointer to next char to send 
  89.     **outhand;        // Handle to text from the Paste 
  90.  
  91. long   
  92.     incount,        // BYU LSC - Count of bytes into this port 
  93.     outcount;        // BYU LSC - Count of bytes out this port 
  94.  
  95.  
  96. //linemode options
  97. short
  98.     litNext,        // next key should be echo'd literal
  99.     lmodeBits,        // Current linemode MODE.  Currently support EDIT and TRAPSIG 
  100.     lmode,            // linemode is active 
  101.     forwardMask,    // should we forward on certain characters
  102.     numForwardKeys; // how many keys to forward on
  103. unsigned char    
  104.     slcLevel[SLC_ARRAY_SIZE+1], //levelBits
  105.     forwardKeys[32],// which keys to forward on 
  106.     slc[SLC_ARRAY_SIZE+1]; //actual values
  107.  
  108. char
  109.     TELstop,        // Character for scrolling to stop 
  110.     TELgo,            // Character for scrolling to go 
  111.     TELip,            // Character for interrupt process 
  112.     kbbuf[MAXKB];    // The keyboard buffer (echo mode ) 
  113.     
  114. GrafPtr 
  115.     wind;
  116.     
  117. Handle
  118.     myInitParams;    //    So we can look up stuff after we have DNS'd.
  119.  
  120. Ptr
  121.     aedata;
  122.  
  123. unsigned char
  124.     myopts[MHOPTS_SIZE],    // My telnet options. Warning: see MHOPTS_BASE
  125.     hisopts[MHOPTS_SIZE],    // His telnet options. Warning: see MHOPTS_BASE
  126.     parsedat[450];            // save the subnegotiation data here
  127.                             //   must be big enough for a Kerberos AP message
  128.  
  129. char
  130.     cannon[80];        // Cannonical hostname
  131.  
  132. Boolean
  133.     authenticate,    // true if authenticating connection wanted
  134.     encrypt;        // true if encrypting connection wanted
  135.     
  136. };
  137.  
  138. typedef struct WindRec WindRec, * WindRecPtr;
  139.